Typical computing systems include volatile memory such as random-access memory (RAM) coupled to persistent data storage such as hard disk drives or solid-state drives. Volatile memory requires a power source for operation; the contents of volatile memory may be lost when the power supply to a computing system is turned off. Non-volatile storage retains its contents while power to the computing system is turned off.
Currently, tiny computing devices (such as devices that make up an Internet of Things) may use energy sources such as solar, mechanical vibration, and RF signals, and thus may have a power supply that is unpredictable, bursty, and highly intermittent. Existing techniques perform computation with such ultra-low power devices by frequently checkpointing volatile system state and executing long-running programs in small increments when power is available. However, checkpointing the whole program state may involve relatively significant time and energy, which may limit the amount of time available for program execution itself.
Mementos, published in ASPLOS 2011, statically instruments a program with probes—inserted after each loop back-edge and after each function call—that read the available voltage level. At runtime, if the voltage level falls below a certain threshold, the whole program state is backed up into non-volatile memory. Thus, in the Mementos system, updates to non-volatile data are not guaranteed to be consistent after a restart. Additionally, reading Vcc (voltage) may be expensive, and checkpointing the whole program state to non-volatile memory each time may not be efficient. Additionally, transaction sizes are not flexible unless Vcc is probed very frequently. See Benjamin Ransford et al., “Mementos: System Support for Long-Running Computation on RFID-Scale Devices,” ASPLOS'11 (Mar. 5-11, 2011).
DINO is based on Mementos. DINO requires the user to manually annotate a program with task/transaction boundaries. Static analysis is used to model the consistency requirements of nonvolatile data as data race conditions in a concurrent program. When execution reaches a task boundary, immediately before checkpointing, DINO makes a volatile copy of each nonvolatile variable that may be written to after a task boundary executes and before another task boundary executes. The amount of non-volatile data that can be logged by DINO is limited by the size of volatile memory in the microcontroller, which is typically small compared to the size of the nonvolatile memory. Similar to Mementos, DINO checkpoints the whole stack and volatile data to non-volatile memory. Transaction sizes in DINO are fixed. See Brandon Lucia & Benjamin Ransford, “A Simpler, Safer Programming and Execution Model for Intermittent Systems,” PLDI'15 (Jun. 13-17, 2015).